import { ajax } from '@/utils/ajax.js'


export const TYPES = {
	user:'用户',
	group:'群'
}

export const complain = async (data) =>{
	if (complain.lock) {
		throw new Error('正在请求中')
	}
	try {
		complain.lock = true;
		const res = await ajax({
			url: '/user/complain',
			data
		})
		return res;
	} catch (e) {
		throw e
	} finally {
		complain.lock = false;
	}
}